<template>
    <el-dialog title="报名详情" v-model="visible" :width="700" destroy-on-close @closed="$emit('closed')">
        <el-descriptions class="margin-top" :title="info.ordernum" :column="3" border>
            <el-descriptions-item>
                <template #label>
                    <div class="cell-item">
                        报名费
                    </div>
                </template>
                {{ info.price }}
            </el-descriptions-item>
            <el-descriptions-item>
                <template #label>
                    <div class="cell-item">
                        报名人数
                    </div>
                </template>
                {{ info.num }}
            </el-descriptions-item>
            <el-descriptions-item>
                <template #label>
                    <div class="cell-item">
                        用户
                    </div>
                </template>
                {{ info.user.username }}
            </el-descriptions-item>
        </el-descriptions>
        <el-descriptions title="报名情况" :column="2" v-for=" (val, key) in info.pinfo" :key="key" border
            style="margin-top: 20px;">
            <el-descriptions-item>
                <template #label>
                    <div class="cell-item">
                        用户
                    </div>
                </template>
                {{ val.realname }}
            </el-descriptions-item>
            <el-descriptions-item>
                <template #label>
                    <div class="cell-item">
                        电话
                    </div>
                </template>
                {{ val.phone }}
            </el-descriptions-item>
            <el-descriptions-item>
                <template #label>
                    <div class="cell-item">
                        备注
                    </div>
                </template>
                {{ val.remark }}
            </el-descriptions-item>
        </el-descriptions>
    </el-dialog>
</template>

<script>
export default {
    emits: ['closed'],
    data () {
        return {
            visible: false,
            info: {
                user: {}
            }
        }
    },
    mounted () {

    },
    methods: {
        //显示
        open () {
            this.visible = true;
            return this
        },
        //表单注入数据
        setData (data) {
            this.info = data
        }
    }
}
</script>

<style></style>
